/**
 * @author liangxi
 * @since 2023/12/21
 */

#ifndef DESIGNPATTERN_CHICAGOPIZZASTORE_H
#define DESIGNPATTERN_CHICAGOPIZZASTORE_H

#include "../PizzaStoreFM.h"
#include "../../Pizza/PizzaFM.h"
#include "../../Pizza/Impl/ChicagoStylePepperoniPizza.h"
#include "../../Pizza/Impl/ChicagoStyleClamPizza.h"
#include "../../Pizza/Impl/ChicagoStyleVeggiePizza.h"
#include "../../Pizza/Impl/ChicagoStyleCheesePizza.h"

namespace Factory_FM {
    class ChicagoPizzaStore : public Factory_FM::PizzaStoreFM {
    public:
        std::shared_ptr<PizzaFM> createPizza(const std::string &type) override {
            if (type == "cheese") {
                return std::make_shared<Factory_FM::ChicagoStyleCheesePizza>();
            } else if (type == "veggie") {
                return std::make_shared<Factory_FM::ChicagoStyleVeggiePizza>();
            } else if (type == "clam") {
                return std::make_shared<Factory_FM::ChicagoStyleClamPizza>();
            } else if (type == "pepperoni") {
                return std::make_shared<Factory_FM::ChicagoStylePepperoniPizza>();
            }
            return {};
        }
    };
}


#endif //DESIGNPATTERN_CHICAGOPIZZASTORE_H
